<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>添加供应商商品库存单</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../style/wangeditor.css">
    <link rel="stylesheet" href="../../../style/index.css">
    <style>
        .el-descriptions-item__label {
            width: 100px;
        }
        .input::-webkit-outer-spin-button,input::-webkit-inner-spin-button {
            -webkit-appearance: none;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <yl-page-header content="添加商品库存单"></yl-page-header>
        <el-form :model="form" :rules="rules" ref="contract" inline-message="true" style="width: 100%">
            <div class="table_titel">
                <div class="titel">添加商品库存单</div>
            </div>
            <el-descriptions :column="2" border size="small">
                <el-descriptions-item label="开始时间">
                    <el-form-item prop="Start_Date">
                        <el-date-picker v-model.trim="form.Start_Date" type="date" placeholder="请选择开始时间"
                            value-format="yyyy-MM-dd"></el-date-picker>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="结束时间">
                    <el-form-item prop="End_Date">
                        <el-date-picker v-model.trim="form.End_Date" type="date" placeholder="请选择结束时间"
                            value-format="yyyy-MM-dd"></el-date-picker>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
            <div class="table_titel">
                <div class="titel">适用商品</div>
                <div class="operation">
                    <el-button @click="dialogVisible = true" type="primary" size="small">选择商品</el-button>
                </div>
            </div>
            <el-table  :data="form.Children.business_supplier_article_stock_detail.slice((page.page-1)*page.limit,page.page*page.limit)" stripe border style="width: 100%">
                <el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
                <el-table-column prop="Supplier_Article_SerialNumber"  align="center" label="可供应商品流水号"></el-table-column>
                <el-table-column prop="Article_Name"  align="center" label="商品名称"></el-table-column>
                <el-table-column prop="Specifications_Name"  align="center" label="规格名称"></el-table-column>
                <el-table-column prop="Picture_URL"  align="center" label="图片"> 
                    <template v-slot="{row}">
                        <el-image fit="contain" :src="BASE_IMG + (row.Picture_URL1?row.Picture_URL1:row.Picture_URL)" style="width:100px;height: 100px;"></el-image>
                    </template>
                </el-table-column>
                <el-table-column prop="Supplier_Name"  align="center" label="供应商"></el-table-column>
                <el-table-column prop="Quantity"  align="center" label="每日供应数量">
                    <template v-slot={row}>
                        <el-input type="number" v-model="row.Quantity" :min="0"></el-input>
                    </template>
                </el-table-column>
                <el-table-column  align="center" label="操作" width="80">
                    <template v-slot="{row,$index}">
                        <el-button type="danger" size="small" @click="handleRemove($index)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :current-page="page.page" :page-sizes="[10 ,100, 200, 300, 400]" :page-size="page.limit"
                layout="total, sizes, prev, pager, next, jumper" :total="form.Children.business_supplier_article_stock_detail.length">
            </el-pagination>
            <div style="height: 90px;"></div>
            <el-form-item class="form-operation">
                <el-button @click="window.history.back()">返回</el-button>
                <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
            </el-form-item>
        </el-form>
        <yl-goods :visible.sync="dialogVisible" @success="getArticle"></yl-goods>
    </div>
    <script type="text/javascript" src="../../../utils/wangeditor.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.min.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../utils/vuex.min.js"></script>
    <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../component/component.js"></script>
    <script type="text/javascript" src="../../../config/config.js"></script>
    <script type="text/javascript" src="../../../utils/compressor.js"></script>
    <script type="text/javascript" src="../../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="../../../utils/utils.js"></script>
    <script type="text/javascript" src="js/add.js"></script>
</body>

</html>